#ifndef STRINGPIECE_H
#define STRINGPIECE_H

#include <string.h>
#include <cstdlib>
#include <cmath>
#include <algorithm>

class StringPiece {
    char *m_data;
    char *m_begin;
    int m_length;
public:
    StringPiece(char *begin, int length)
        : m_begin(begin), m_length(length) {}

    char *begin() const {return m_begin;}
    int length() const {return m_length;}

    friend bool operator<(const StringPiece& a, const StringPiece& b);
};

#endif // STRINGPIECE_H
